package com.sophossystems.client.asmon.dto;

import java.io.Serializable;


/** 
 * This class represents the primary key of the Module table.
 */
public class ModulePkDTO implements Serializable
{
	/**
	 * 
	 */
	private static final long serialVersionUID = -822890242375537231L;

	protected int idModule;

	/** 
	 * This attribute represents whether the primitive attribute idModule is null.
	 */
	protected boolean idModuleNull;

	/** 
	 * Sets the value of idModule
	 */
	public void setIdModule(int idModule)
	{
		this.idModule = idModule;
	}

	/** 
	 * Gets the value of idModule
	 */
	public int getIdModule()
	{
		return idModule;
	}

	/**
	 * Method 'ModulePk'
	 * 
	 */
	public ModulePkDTO()
	{
	}

	/**
	 * Method 'ModulePk'
	 * 
	 * @param idModule
	 */
	public ModulePkDTO(final int idModule)
	{
		this.idModule = idModule;
	}

	/** 
	 * Sets the value of idModuleNull
	 */
	public void setIdModuleNull(boolean idModuleNull)
	{
		this.idModuleNull = idModuleNull;
	}

	/** 
	 * Gets the value of idModuleNull
	 */
	public boolean isIdModuleNull()
	{
		return idModuleNull;
	}

	/**
	 * Method 'equals'
	 * 
	 * @param _other
	 * @return boolean
	 */
	@Override
	public boolean equals(Object _other)
	{
		if (_other == null) {
			return false;
		}
		
		if (_other == this) {
			return true;
		}
		
		if (!(_other instanceof ModulePkDTO)) {
			return false;
		}
		
		final ModulePkDTO _cast = (ModulePkDTO) _other;
		if (idModule != _cast.idModule) {
			return false;
		}
		
		if (idModuleNull != _cast.idModuleNull) {
			return false;
		}
		
		return true;
	}

	/**
	 * Method 'hashCode'
	 * 
	 * @return int
	 */
	@Override
	public int hashCode()
	{
		int _hashCode = 0;
		_hashCode = 29 * _hashCode + idModule;
		_hashCode = 29 * _hashCode + (idModuleNull ? 1 : 0);
		return _hashCode;
	}

	/**
	 * Method 'toString'
	 * 
	 * @return String
	 */
	@Override
	public String toString()
	{
		StringBuffer ret = new StringBuffer();
		ret.append( "com.sophossystems.client.asmon.dto.ModulePk: " );
		ret.append( "idModule=" + idModule );
		return ret.toString();
	}

}
